﻿#region Using Statements
using System;
#endregion

namespace DirectZZT.Shared.Audio
{
    /// <summary>
    /// Defines options how a sound/music shall be played.
    /// </summary>
    public struct PlayOptions
    {
        /// <summary>
        /// Gets/sets whether or not this sound is treated as music.
        /// </summary>
        public bool IsMusic { get; set; }
        /// <summary>
        /// Gets/sets whether or not this sound shall be repeated endlessly.
        /// </summary>
        public bool Repeat { get; set; }
        /// <summary>
        /// Gets/sets the callback that is called when the sound has finished playing.
        /// This does not occur when <see cref="P:Repeat"/> was set to <c>true</c>.
        /// </summary>
        public PlayFinished PlayFinishedCallback { get; set; }

        #region Factory

        /// <summary>
        /// Returns a <see cref="PlayOptions"/> that is suitable for a one-time sound effect.
        /// </summary>
        public static PlayOptions FXOnce
        {
            get { return new PlayOptions(); }
        }

        #endregion
    }
}
